#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QtGui/QMainWindow>
#include <QMenuBar>

class FancyTabWidget;

namespace RUNNINGLIB
{
    class QRunningWindow;
}

class QAbstractPage;

class MainWindow : public QMainWindow
{
    Q_OBJECT
public:
    MainWindow(QWidget *parent = 0);
    ~MainWindow();

    void        show();
protected:
    void        saveSetting();
    void        initMenuBar();
    void        closeEvent(QCloseEvent *);
public slots:
    void        projectOpen();
    void        projectClosed();
    void        runSignal();
    void        stopSignal();
protected slots:
    void        newProject();
    void        openProject();
    void        run();
    void        stop();
    void        showDevice();
    void        showSyncChoose();

    void        page_changed(int index);

    bool        pageAt(const QVariant &param);
protected:
    FancyTabWidget      *m_fancyTab;
    QMenuBar            *m_menuBar;
    RUNNINGLIB::QRunningWindow    *m_runningWindow;
    QList<QAbstractPage*>   m_pages;
};

#endif // MAINWINDOW_H
